<?php
class Texto extends AppModel {

	var $name = 'Texto';
        var $actsAs = array('Sluggable' => array('label'=>'titulo'),'CakePtbr.AjusteData');
        var $recursive = 3;
	var $validate = array(
		'titulo' => array('notempty')
	);
        var $order = 'Texto.created DESC';

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Mondano' => array(
			'className' => 'Mondano',
			'foreignKey' => 'usuario_id',
			'conditions' => '',
			'fields' => '',
			'order' => 'Mondano.nick'
		),
		'Edicao' => array(
			'className' => 'Edicao',
			'foreignKey' => 'edicao_id',
			'conditions' => '',
			'fields' => '',
			'order' => 'Edicao.id DESC'
		),
		'Categoria' => array(
			'className' => 'Categoria',
			'foreignKey' => 'categoria_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

        var $hasMany = array(
            'Comentario' => array(
                'className' => 'Comentario',
                'conditions' => '',
                'fields' => '',
                'order' => 'Comentario.created DESC'
            )
        );
}
?>